package com.student.model;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * SchoolRollChange entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "School_Roll_Change", schema = "dbo", catalog = "StudentManager")
public class SchoolRollChange implements java.io.Serializable {

	// Fields

	private Long schoolRollChangeId;
	private Student student;
	private Timestamp schoolRollChangeTime;
	private String schoolRollChangeContent;

	// Constructors

	/** default constructor */
	public SchoolRollChange() {
	}

	/** minimal constructor */
	public SchoolRollChange(Long schoolRollChangeId, Student student,
			String schoolRollChangeContent) {
		this.schoolRollChangeId = schoolRollChangeId;
		this.student = student;
		this.schoolRollChangeContent = schoolRollChangeContent;
	}

	/** full constructor */
	public SchoolRollChange(Long schoolRollChangeId, Student student,
			Timestamp schoolRollChangeTime, String schoolRollChangeContent) {
		this.schoolRollChangeId = schoolRollChangeId;
		this.student = student;
		this.schoolRollChangeTime = schoolRollChangeTime;
		this.schoolRollChangeContent = schoolRollChangeContent;
	}

	// Property accessors
	@Id
	@Column(name = "School_Roll_Change_id", unique = true, nullable = false, precision = 18, scale = 0)
	@GeneratedValue
	public Long getSchoolRollChangeId() {
		return this.schoolRollChangeId;
	}

	public void setSchoolRollChangeId(Long schoolRollChangeId) {
		this.schoolRollChangeId = schoolRollChangeId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "Student_id", nullable = false)
	public Student getStudent() {
		return this.student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	@Column(name = "School_Roll_Change_Time", length = 23)
	public Timestamp getSchoolRollChangeTime() {
		return this.schoolRollChangeTime;
	}

	public void setSchoolRollChangeTime(Timestamp schoolRollChangeTime) {
		this.schoolRollChangeTime = schoolRollChangeTime;
	}

	@Column(name = "School_Roll_Change_Content", nullable = false, length = 256)
	public String getSchoolRollChangeContent() {
		return this.schoolRollChangeContent;
	}

	public void setSchoolRollChangeContent(String schoolRollChangeContent) {
		this.schoolRollChangeContent = schoolRollChangeContent;
	}

}